package com.heima.user.feign;

import com.heima.client.user.IUserClient;
import com.heima.model.common.dtos.ArticleInfoDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Geralt
 * @Date 2024-08-02 16:54
 */
@Slf4j
@RestController
public class UserFollowClient implements IUserClient {

    @Autowired
    private ApUserService apUserService;
    /**
     * 查询用户关注信息
     *
     * @param articleInfoDto
     * @return
     */
    @PostMapping("/api/v1/user/query_userFollow")
    public ResponseResult queryUserFollow(@RequestBody ArticleInfoDto articleInfoDto) {
        log.info("查询关注用户信息是：{}", articleInfoDto);
        return apUserService.getUserFollow(articleInfoDto);
    }
}
